// 这个文件是我们自己加的  在这里配置文件路径的别名
const path = require('path');
const resolve = (dir) => {
    return path.join(__dirname, dir);  // path.join(__dirname)设置绝对路径
};

module.exports = {
    chainWebpack: (config) => {
        // set第一个参数：设置的别名，第二个参数：设置的路径
        // config.resolve.alias.set('@', resolve('./src'));
        config.resolve.alias.set('components', resolve('./src/components'));
        config.resolve.alias.set('assets', resolve('./src/assets'));
        config.resolve.alias.set('views', resolve('./src/views'));
        config.resolve.alias.set('common', resolve('./src/common'));
        config.resolve.alias.set('network', resolve('./src/network'));



    }
}